package com.github.fuse.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * @author: wangdejun
 * @create: 2019-10-24 14:00
 **/
@Fuse
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Timeout {

    // 超时时间，默认-1，超时
    int timeout() default -1;

    TimeUnit timeUnit() default TimeUnit.SECONDS;

    String fuseMethod() default "";
}
